Remove ES5 references, misc cleanup#63075
Merged
jakebailey merged 3 commits intomicrosoft:mainfrom Feb 3, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request removes remaining non-test references to ScriptTarget.ES5 after the deprecation of ES5 as a compilation target. The PR includes cleanup changes across the codebase and adds a new test to document the behavior change for enum member name validation.
Changes:
- Changed identifier text validation from ES5 to ESNext standard in checker.ts, affecting how enum member names are validated for type representation
- Simplified conditions in transformers and emitter that previously checked for ES5, now using ES2015 or removing the check entirely
- Added comprehensive test case demonstrating enum member name behavior with special characters
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/cases/compiler/enumMemberNameNonIdentifier.ts | New test file demonstrating enum member name handling for non-standard identifiers |
| tests/baselines/reference/enumMemberNameNonIdentifier.types | Baseline showing type representation for enum members with special character names |
| tests/baselines/reference/enumMemberNameNonIdentifier.symbols | Baseline showing symbol information for enum members with special character names |
| tests/baselines/reference/enumMemberNameNonIdentifier.js | Baseline showing JavaScript and declaration file output for enum test |
| src/compiler/transformers/ts.ts | Changed class IIFE promotion check from <= ES5 to < ES2015 |
| src/compiler/emitter.ts | Removed ES5 version check for trailing comma support in object literals |
| src/compiler/checker.ts | Changed enum member identifier validation from ES5 to ESNext; removed ES5 check in class name collision detection |
fcd0019 to
2894fcc
Compare
RyanCavanaugh
approved these changes
Feb 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some cleanup after #63067.
This removes all remaining non-test references to
ScriptTarget.ES5. Most are just dead code or can be rephrased.The one behavior difference is in the third commit. For enums, we were being conservative and printing identifiers that are only valid in ES2015+ as string literals. However, this does not practically matter because declaration emit just reuses the nodes, so everyone has been emitting these characters anyway. That and, we always parse declaration files with the latest options such that they're always cached (fairly certain; definitely true in Corsa), so it doesn't matter there. All that changes is the
typesbaseline, which also implies that hover would change, which it does.Strada before:
Corsa today (what this PR would do):
And of course, Corsa does not even have the code to do it the old way, lacking ES5 stuff or the plumbing to even pass that down.